﻿@model BuildContext
@{
    var project = Model.Project;
}
@functions
{
    /// <summary>
    /// 获取领域名称
    /// </summary>
    public string GetDomainName()
    {
        return $"{Model.Project.Module}.{Model.GetCurrentSchema()?.Name}.{Model.Build.Module}";
    }

}
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <AssemblyName>@GetDomainName()</AssemblyName>
        <RootNamespace>@GetDomainName()</RootNamespace>
        <LangVersion>7.3</LangVersion>
    </PropertyGroup>
    <ItemGroup>
        <ProjectReference Include="..\@(Model.Project.Module).Infrastructure\@(Model.Project.Module).Infrastructure.csproj" />
    </ItemGroup>
    <ItemGroup>
@foreach (var table in Model.GetCurrentSchema().Tables)
{
        <Compile Update="Models/@(table.Name).*.cs">
            <DependentUpon>@(table.Name).cs</DependentUpon>
        </Compile>
}
    </ItemGroup>
</Project>